

package practice4.aop.annotation;  

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class SpringAOPAnnotationTest {  
      
    @Test  
    public void inteceptorTest() throws UnsupportedEncodingException{  
		String url = SpringAOPAnnotationTest.class.getResource("").getPath();
		url = URLDecoder.decode(url, "UTF-8");
        ApplicationContext ctx = new FileSystemXmlApplicationContext(url+"applicationContext.xml");  
        PersonServer bean = (PersonServer)ctx.getBean("personServiceBean");  
        bean.save("haha");  
    }  
}  